package com.buydeem.factory.ab;

/**
 *
 *
 * @author zengchao
 * @date 2022-04-24 16:59:59
 */
public class App {
    public static void main(String[] args) {
        System.out.println("用户电脑差使用简单UI");
        IUiComponentFactory factory = new SimpleUiComponentFactory();
        Button button = factory.createButton();
        button.showStyle();
        Menu menu = factory.createMenu();
        menu.showStyle();

        System.out.println("用户电脑好使用漂亮的UI");
        factory = new BeautifulUiComponentFactory();
        button = factory.createButton();
        button.showStyle();
        menu = factory.createMenu();
        menu.showStyle();
    }
}
